﻿using System;
using System.Collections.Generic;
using System.Text;

namespace sands
{
    public class Deposit
    {
        private String[] _details;
        private int propertiesNum = 4;

        public String Date
        {
            get
            {
                return _details[0];
            }
            set
            {
                _details[0] = value;
            }
        }
        public String Number
        {
            get
            {
                return _details[1];
            }
            set
            {
                _details[1] = value;
            }
        }
        public String Title
        {
            get
            {
                return _details[2];
            }
            set
            {
                _details[2] = value;
            }
        }
        public String Value
        {
            get
            {
                return _details[3];
            }
            set
            {
                _details[3] = value;
            }
        }

        public Deposit(String date, String number, String title, String value)
        {
            _details = new String[propertiesNum];
            Date = date;
            Number = number;
            Title = title;
            Value = value;
        }

        public Deposit(Object[] details)
        {
            _details = new String[propertiesNum];
            Array.Copy(details, 1, _details, 0, propertiesNum);
        }

        public String[] ToStringArray()
        {
            return _details;
        }
    }
}
